<template>
  <div class="father">
      <div class="return">
         <el-button type="infor" title="上一级页面" @click="returnFormModel"><i class="el-icon-back">返回</i></el-button></div>
      <div class="content">
          <p v-html="dataSvg">{{dataSvg}}</p>
      </div>
  </div>
</template>

<script>
export default {
    name:"ViewProcessInner",
    data(){
        return{
            dataSvg:''
        }
    },
    mounted(){
        this.initViewProcess();
    },
    methods:{
        initViewProcess(){
          if(this.$route.query.processDefinitionId){
           this.getRequest("/activity/ActReDeployment/query/ProcessModelSvgImageByProcessDefinitionId/"+this.$route.query.processDefinitionId).then(resp => {
               if (resp) {
                   this.dataSvg = resp;
               }
           });
          }else if(this.$route.query.deploymentId){
            this.getRequest("/activity/ActReDeployment/query/ProcessModelSvgImage/"+this.$route.query.deploymentId).then(resp => {
                if (resp) {
                    this.dataSvg = resp;
                }
            });
          }
        },
        returnFormModel(){
            this.$router.push(this.$route.query.viewPage);
        }
    }
}
</script>

<style scoped>
  .content{
    position: relative;
  }
  .return{
    position: absolute;
    bottom: 100;
    right: 10px;
  }
</style>>
